﻿/*CREATE TABLE [dbo].[Permisos] (
    [PermisoGuid]            UNIQUEIDENTIFIER ROWGUIDCOL NOT NULL,
    [EstadoGuid]             UNIQUEIDENTIFIER NOT NULL,
    [EstadoId]               INT              NOT NULL,
    [DistritoGuid]           UNIQUEIDENTIFIER NOT NULL,
    [DistritoId]             INT              NOT NULL,
    [MunicipioGuid]          UNIQUEIDENTIFIER NOT NULL,
    [MunicipioId]            INT              NOT NULL,
    [JuntaGuid]              UNIQUEIDENTIFIER NOT NULL,
    [JuntaId]                INT              NOT NULL,
    [AreaGuid]               UNIQUEIDENTIFIER NOT NULL,
    [AreaId]                 INT              NOT NULL,
    [CicloGuid]              UNIQUEIDENTIFIER NOT NULL,
    [CicloId]                INT              NOT NULL,
    [CultivoGuid]            UNIQUEIDENTIFIER NOT NULL,
    [CultivoId]              INT              NOT NULL,
    [CultivoNombre]          NVARCHAR (250)   NOT NULL,
    [CultivoNumeroGuid]      UNIQUEIDENTIFIER NOT NULL,
    [CultivoNumeroId]        INT              NOT NULL,
    [CultivoEstacionGuid]    UNIQUEIDENTIFIER NOT NULL,
    [CultivoEstacionId]      INT              NOT NULL,
    [CultivoTipoGuid]        UNIQUEIDENTIFIER NULL,
    [CultivoTipoId]          INT              NULL,
    [VariedadGuid]           UNIQUEIDENTIFIER NOT NULL,
    [VariedadId]             INT              NOT NULL,
    [VariedadNombre]         NVARCHAR (250)   NOT NULL,
    [RiegoSistemaGuid]       UNIQUEIDENTIFIER NOT NULL,
    [RiegoSistemaId]         INT              NOT NULL,
    [RiegoFuenteGuid]        UNIQUEIDENTIFIER NOT NULL,
    [RiegoFuenteId]          INT              NOT NULL,
    [MovimientoTipoGuid]     UNIQUEIDENTIFIER NOT NULL,
    [MovimientoTipoId]       INT              NOT NULL,
    [ProveedorSemillaGuid]   UNIQUEIDENTIFIER NULL,
    [ProveedorSemillaId]     INT              NULL,
    [FechaGuid]              UNIQUEIDENTIFIER NOT NULL,
    [FechaId]                INT              NOT NULL,
    [AfianzadoraGuid]        UNIQUEIDENTIFIER NULL,
    [AfianzadoraId]          INT              NULL,
    [GarantiaLiquidaGuid]    UNIQUEIDENTIFIER NULL,
    [GarantiaLiquidaId]      INT              NULL,
    [ComercializadoraGuid]   UNIQUEIDENTIFIER NULL,
    [ComercializadoraId]     INT              NULL,
    [ProductorGuid]          UNIQUEIDENTIFIER NOT NULL,
    [ProductorId]            INT              NOT NULL,
    [ProductorMunicipioGuid] UNIQUEIDENTIFIER NOT NULL,
    [ProductorMunicipioId]   INT              NOT NULL,
    [ProductorEjidoGuid]     UNIQUEIDENTIFIER NULL,
    [ProductorEjidoId]       INT              NULL,
    [ProductorNombre]        NVARCHAR (250)   NOT NULL,
    [LeyendaGuid]            UNIQUEIDENTIFIER NOT NULL,
    [LeyendaId]              INT              NOT NULL,
    [CancelacionGuid]        UNIQUEIDENTIFIER NULL,
    [CancelacionId]          INT              NULL,
    [AgenteGuid]             UNIQUEIDENTIFIER NOT NULL,
    [AgenteId]               INT              NOT NULL,
    [ConcesionGuid]          UNIQUEIDENTIFIER NOT NULL,
    [ConcesionId]            INT              NOT NULL,
    [ProduccionTipoGuid]     UNIQUEIDENTIFIER NOT NULL,
    [ProduccionTipoId]       INT              NOT NULL,
    [FinanciamientoGuid]     UNIQUEIDENTIFIER NOT NULL,
    [FinanciamientoId]       INT              NOT NULL,
    [UsuarioGuid]            UNIQUEIDENTIFIER NOT NULL,
    [UsuarioModuloGuid]      UNIQUEIDENTIFIER NOT NULL,
    [UsuarioModuloId]        INT              NOT NULL,
    [UsuarioSeccionGuid]     UNIQUEIDENTIFIER NOT NULL,
    [UsuarioSeccionId]       INT              NOT NULL,
    [UsuarioMunicipioGuid]   UNIQUEIDENTIFIER NOT NULL,
    [UsuarioMunicipioId]     INT              NOT NULL,
    [UsuarioEjidoGuid]       UNIQUEIDENTIFIER NULL,
    [UsuarioEjidoId]         INT              NULL,
    [UsuarioTenenciaGuid]    UNIQUEIDENTIFIER NOT NULL,
    [UsuarioTenenciaId]      INT              NOT NULL,
    [UsuarioPadron]          NVARCHAR (250)   NOT NULL,
    [UsuarioSubPadron]       NVARCHAR (250)   NOT NULL,
    [UsuarioControl]         NVARCHAR (250)   NOT NULL,
    [UsuarioNombre]          NVARCHAR (250)   NOT NULL,
    [Folio]                  INT              NOT NULL,
    [Serie]                  INT              NOT NULL,
    [FechaDeExpedicion]      DATETIME         NOT NULL,
    [TiempoInicial]          DATETIME         NOT NULL,
    [TiempoFinal]            DATETIME         NOT NULL,
    [KilogramosDeSemilla]    DECIMAL (18, 2)  NOT NULL,
    [SuperficieExpedida]     DECIMAL (18, 4)  NOT NULL,
    [DotacionDeCultivo]      DECIMAL (18, 2)  NOT NULL,
    [DotacionDelModulo]      DECIMAL (18, 2)  NOT NULL,
    [DotacionMM3]            DECIMAL (18, 2)  NOT NULL,
    [DestruccionDeSoca]      NTEXT            NOT NULL,
    [Volumen]                DECIMAL (18, 2)  NOT NULL,
    [Predio]                 NTEXT            NOT NULL,
    [Referencia]             NTEXT            NOT NULL,
    [Credito]                BIT              NOT NULL,
    [Status]                 TINYINT          NOT NULL
);*/

